﻿package com.sgcc.nfc.lock.data.local.mapper

import com.sgcc.nfc.lock.data.local.entity.OperationLogEntity
import com.sgcc.nfc.lock.domain.model.OperationLog

fun OperationLogEntity.toDomain(): OperationLog = OperationLog(
    logId = logId,
    operationType = operationType,
    userId = userId,
    userName = userName,
    regionId = regionId,
    lockId = lockId,
    lockNfcId = lockNfcId,
    roomId = roomId,
    roomName = roomName,
    longitude = longitude,
    latitude = latitude,
    operationTime = operationTime,
    remark = remark
)

fun OperationLog.toEntity(): OperationLogEntity = OperationLogEntity(
    logId = logId,
    operationType = operationType,
    userId = userId,
    userName = userName,
    regionId = regionId,
    lockId = lockId,
    lockNfcId = lockNfcId,
    roomId = roomId,
    roomName = roomName,
    longitude = longitude,
    latitude = latitude,
    operationTime = operationTime,
    remark = remark
)
